var mysql = require("mysql");
var pool = mysql.createPool({
  connectionLimit: 10,
  host: "localhost",
  user: "root",
  password: "root",
  database: "2203a3",
});
const query = async (sql) => {
    console.log(sql)
  return await new Promise((resolve, reject) => {
    pool.query(sql, function (err, res) {
      if (err) {
        reject(err);
      } else {
        resolve(res);
      }
    });
  });
};
module.exports = query;
